home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 12 / 2 / DISK1227.ZIP / TECHMAN.DOC < prev   
Text File  |  1990-02-07  |  18KB  |  433 lines

  1.        
  2.        
  3.        
  4.        
  5.        
  6.        
  7.        
  8.        
  9.        
  10.        
  11.        
  12.        
  13.        
  14.                         ROKMAR ASSETS INVENTORY SYSTEM
  15.        
  16.        
  17.                                   Version 2.0
  18.        
  19.                           Technical Reference Manual
  20.        
  21.        
  22.        
  23.        
  24.        
  25.        
  26.        
  27.        
  28.        
  29.        
  30.        
  31.        
  32.        
  33.        
  34.        
  35.        
  36.        
  37.        
  38.        
  39.        
  40.        
  41.                             ROKMAR Computer Systems
  42.                               Copyright (c) 1990
  43.        
  44.        
  45.                     
  46.                        ROKMAR ASSETS INVENTORY SYSTEM
  47.        
  48.        
  49.        
  50.        
  51.        
  52.        
  53.        
  54.        
  55.        
  56.        
  57.        
  58.        
  59.        
  60.                                      INDEX
  61.        
  62.                        Introduction ................  1
  63.                        Copyright Notice ............  3
  64.                        ASREPORT ....................  4
  65.                        BASIC Reporting .............  6
  66.                        Data Dictionary .............  8
  67.                        Custom Help Windows .........  9
  68.                        Custom Report Menu .......... 10
  69.        
  70.                                                                   Page  1
  71.                                  INTRODUCTION      
  72.        
  73.        
  74.        This  document  describes  the internal workings  of  the  ROKMAR 
  75.        Assets  Inventory  System  and methods to  customize  the  report 
  76.        outputs.
  77.        
  78.        The most user requested feature of any application is the ability 
  79.        to  create custom reports. Reports are one of the most  important 
  80.        and useful outputs from an application, and certainly one of  the 
  81.        most  visible. The usefulness of the report can be degraded  when 
  82.        the  report  heading and field names are described in  a  generic 
  83.        fashion  using terms not used by the company. Most users want  to 
  84.        customize  their  reports and create business  specific  versions 
  85.        that  are immediately recognizable. This document will  tell  you 
  86.        how to do just that.
  87.        
  88.        This application is built over a relational database model.  This 
  89.        means  that  fields  in files can be linked to  fields  in  other 
  90.        files. The fact that this system sits on a database allows us  to 
  91.        be  able  to extract data by field name without  having  to  know 
  92.        where that data is. A quick example would be to try this program:
  93.        
  94.        Type: ASREPORT ASSETS ASSET_KEY DESC
  95.        
  96.        The screen will display the data fields from the records from the 
  97.        file  ASSETS  sorted  by ASSET_KEY. We  have  written  our  first 
  98.        report;  see how simple this can be. This program and a  list  of 
  99.        all the data fields are described later. 
  100.        
  101.                                                                   Page  2
  102.        INTRODUCTION (cont.)      
  103.        
  104.        
  105.        There  are  two  custom reporting  methods  available  with  this 
  106.        system: the method described above using program ASREPORT,  which 
  107.        is  a  simple  data  lister; and a  second  method  which  allows 
  108.        complete   format  control  of  the  data.  Any  extraction   and 
  109.        formatting  scheme is possible from printing small gum labels  to 
  110.        printing  large 162 character wide reports to any  printer  type. 
  111.        Method  two requires some programming expertise or the desire  to 
  112.        fiddle  around with some code. Since these reports are read  only 
  113.        from  extracts, no harm to the database is possible, so  you  can 
  114.        not hurt anything by tinkering. 
  115.            
  116.        
  117.        
  118.                                                                  Page  3
  119.                                 COPYRIGHT NOTICE                         
  120.        
  121.        This  software  product  is the copyrighted  property  of  ROKMAR 
  122.        Computer  Systems,  and  the usual  shareware  limited  agreement 
  123.        applies:
  124.        
  125.        1.  No  fee may be charged for the retail sale  of  this  product 
  126.        other than a reasonable copy and distribution charge.
  127.        
  128.        2.  This  product  may only be distributed in  its  original  and 
  129.        complete form, including documentation and copyright notice.
  130.        
  131.        3.  This product may not be distributed, whole or in any part  as 
  132.        a  section  or  part of any commercial  product  without  written 
  133.        permission of ROKMAR COMPUTER SYSTEMS. 
  134.        
  135.        
  136.                                    DISCLAIMER
  137.        
  138.        ROKMAR  Computer Systems, its owners, management, or   associates 
  139.        will  not be liable for any damages or claims related in any  way 
  140.        to  the  use  of this product and  disclaims  all  warranties  or 
  141.        implied warranties by the distributor.
  142.        
  143.        
  144.                                                                  Page  4
  145.        ASREPORT PROGRAM
  146.        
  147.        
  148.        This program us useful for quick report lists to the screen, to a 
  149.        printer  or  to  an  ASCII  file that  can  be  imported  to  any 
  150.        spreadsheet or wordprocessor to create business statements.
  151.        
  152.        This program is not incorporated into the application in general, 
  153.        but runs under DOS. This program can be included into the  custom 
  154.        menu  which  is  a part of the ASSETS  custom  report  system  in 
  155.        general. The name of the program is ASREPORT.EXE.
  156.        
  157.            The  following descriptions will use the C> prompt. Don't  be 
  158.        confused  if  you  are  using a  different  disk  drive  and  see 
  159.        something else. 
  160.        
  161.            For a demonstration, type:
  162.                C>ASREPORT ASSETS
  163.        
  164.            The  entire list of records will scroll across  your  screen. 
  165.        This is interesting if used as a browse of the data. Now try: 
  166.        
  167.                C>ASREPORT ASSETS ASSET_KEY DESC
  168.        
  169.        Notice  that only the data fields you selected, and in the  order 
  170.        you selected appear. Interesting?  The format of this command is: 
  171.        
  172.                C>ASREPORT filename [file-element1 file-element2 ...]
  173.        
  174.        The filename in this case is ASSETS.
  175.        
  176.        The file elements are those listed in a later chapter and must be 
  177.        spelled exactly.  If the file elements are not used, all elements 
  178.        will  be  extracted.   If listed on the screen,  the  right  most 
  179.        elements will be truncated.  Now lets print something: 
  180.        
  181.           C>ASREPORT ASSETS ASSET_TYPE DESC USER_DEF > PRN
  182.        
  183.            Another way to do this would be:
  184.        
  185.           C>ASREPORT ASSETS ASSET_TYPE DESC USER_DEF > myfile
  186.           C>COPY MYFILE PRN
  187.        
  188.            The  first method extracts the data and redirects the I/O  to 
  189.        the  printing  device. The second method extracts  the  data  and 
  190.        redirects  the I/O into a file of your own choosing, then  prints 
  191.        the file. 
  192.        
  193.                                                                  Page  5
  194.        ASREPORT PROGRAM (cont.)
  195.        
  196.        
  197.        Why extract the data into another file?
  198.        
  199.        This is one of the nicer features of this program.  This file can 
  200.        be imported into any spreadsheet, (Lotus 123, etc.), database, or 
  201.        word processing program.  The data may be used by the spreadsheet 
  202.        program to be reformatted, sorted in other ways, or used for more 
  203.        elaborate uses.  A program may use this data to upload into other 
  204.        databases  or report the data in other formats. The data  may  be 
  205.        included into a word processor for use inside a business  report, 
  206.        or for any other special purpose. 
  207.        
  208.                                                                   Page  6
  209.        BASIC REPORTING
  210.        
  211.        This  section describes a more elaborate reporting  system.  This 
  212.        system  is  more complicated, but is without limitations  in  its 
  213.        usage for reporting, extracting, etc.
  214.        
  215.        This  section is called BASIC reporting because it actually  uses 
  216.        the BASIC language distributed with every MS-DOS/PC-DOS operating 
  217.        system. BASIC has all the power of any report writer program  and 
  218.        more.  It  is virtually as simple to use, but is not  limited  in 
  219.        power as most every report writer programs available. 
  220.        
  221.        Report writing is typically composed of three parts:
  222.        
  223.        1.  Extraction: The data is read from the data files and  written 
  224.        to an ASCII file.
  225.        
  226.        Extraction  is done in ASSETS by a program similar  to  ASREPORT, 
  227.        called EXTRACT. This program is used from DOS in the same way:
  228.        
  229.                C>EXTRACT filename [file-element1 file-element2 ...]
  230.        
  231.        
  232.        2.  Sorting:  The  ASCII  file is then sorted in  the  order  the 
  233.        output is desired.
  234.        
  235.        Sorting  is  then  done by a sort program. DOS  supplies  a  sort 
  236.        program  called SORT. The only problem with this program is  that 
  237.        it  will  only work with files small enough to fit  into  memory. 
  238.        Sorting  can  be  done with any sorting  program  available  from 
  239.        numerous sources. If your database is not too large, the DOS sort 
  240.        will work fine. A typical example would be:
  241.        
  242.                C>SORT <infile >outfile
  243.        
  244.        Notice  that in this case the sorting routine sorts the  data  in 
  245.        the  order that the elements are in the record. This  means  that 
  246.        when extracting the data, you should list the elements to extract 
  247.        by the extract program in the order you wish to sort by.
  248.        
  249.        
  250.        3.  Output  Formatting: The  sorted ASCII file is then  read  and 
  251.        written  to the printer in some defined format. This can be  done 
  252.        with any language, but examples are supplies using BASIC. 
  253.        
  254.        The program should:
  255.        
  256.        -  Read in each record of data from the ASCII file.
  257.        -  Either select or reject this record.
  258.        -  Format the output report line with the data and write this line.
  259.        
  260.        Any  of  the  programs  ending in .BAS  are  examples  of  report 
  261.        programs.
  262.                                                                   Page  7
  263.        BASIC REPORTING (cont.)
  264.        
  265.        Finally,  all three of these steps should be placed into  a  .BAT 
  266.        file as a packaged report program. This will require the use of a 
  267.        text  editor such as the DOS EDLIN program, or a  word  processor 
  268.        which creates ASCII output files.
  269.        
  270.        This  .BAT  file can then be run from the DOS  prompt  or  placed 
  271.        inside the custom reporting menu supplied with ASSETS.
  272.        
  273.        
  274.        Following is an example, the file name is SAMPRPT1.BAT:
  275.        
  276.        REM ******************************************************
  277.        REM **** SAMPLE REPORT 1, SIMPLE LIST BY KEY         *****
  278.        REM ******************************************************
  279.        ECHO OFF
  280.        EXTRACT ASSETS > TEMP.DAT
  281.        SORT <TEMP.DAT >TEMPSORT.DAT
  282.        GWBASIC SAMPRPT1
  283.        DEL TEMP.DAT
  284.        DEL TEMPSORT.DAT
  285.        
  286.        Notice  the  three main parts of a  report  program:  extraction, 
  287.        sorting then formatting done here with GWBASIC. The BASIC program 
  288.        used here is SAMPRPT1.BAS.
  289.        
  290.        An example type of custom report might be:
  291.        The  user defined field 1 has been defined by your company to  be 
  292.        the department responsible for the record. You will want a report 
  293.        which  lists all records by department, then by client,  then  by 
  294.        record number.
  295.        
  296.        EXTRACT  ASSETS  USER_DEF  ASSET_KEY  DESC 
  297.        APPRAISAL DATE_PURCHASED > rptfile.tmp
  298.        SORT <rptfile.tmp >sortfile.tmp
  299.        GWBASIC MYRPT.BAS
  300.        DEL rptfile.tmp
  301.        DEL sortfile.tmp
  302.        
  303.        The  BASIC program could put your company's name on  the  heading 
  304.        and  describe the report as you use it. The field USER_DEF  could 
  305.        be called DEPARTMENT CODE (or whatever you wish). 
  306.        
  307.        You can even select only specific departments to print; in  fact, 
  308.        any selection criteria you wish is possible. There are no  limits 
  309.        at all imposed on a creative user.
  310.        
  311.        
  312.        
  313.                                                                  Page  8
  314.        DATA DICTIONARY
  315.        
  316.        The   two  data  files  are  described  here.  For  an   in-depth 
  317.        textual description of each field, refer to the help windows.
  318.        
  319.        File ASSETS
  320.        
  321.        
  322.          Field              Description                   Size    Cobol Pic
  323.        -----------------    ---------------------------   ------  ---------
  324.         ASSET_KEY            A unique key                  5      X(5)
  325.        
  326.         DESC                 The Description of the        25     X(25)
  327.                               article of value.
  328.        
  329.         TYPE                 The Type code. A category     8      X(8)
  330.                               for the article, ie., tools,
  331.                               equipment, etc.
  332.        
  333.         LOCATION_STORED      The Location Code where the   8      X(85)
  334.                               article is stored, ie.,
  335.                               garage, off-site, xa-01-01, 
  336.                               etc.
  337.        
  338.         USER_DEFINED         A User-Defined code for any   8      X(8)
  339.                               special purpose requirement,
  340.                               ie., persons name, sub-
  341.                               breakdowns of Type or
  342.                               Location, anything you wish.
  343.        
  344.         DATE_PURCHASED       The date the article was      6      X(6)
  345.                               purchased.                         (MMDDYY)  
  346.        
  347.         PURCHASE_COST        The purchase cost or value    7      9(5)v99
  348.                               of the article.                  (characters)
  349.        
  350.         PURCHASED_FROM       Description of where the      25     X(25)
  351.                               article was purchased from.
  352.        
  353.         APPRAISAL            The appraisal value, if       9      9(5)V99
  354.                               applicable.                          
  355.        
  356.         MODEL_NUMBER         The article model number.     10     X(10)
  357.        
  358.         SERIAL_NUMBER        The article serial number.    20     X(20)
  359.        
  360.         COMMENT1             First line of Comments.       50     X(50)
  361.        
  362.         COMMENT2             Second line of Comments.      50     X(50)
  363.        
  364.        
  365.                                                                  Page  9
  366.        CUSTOM HELP WINDOWS
  367.        
  368.        Be sure to make a copy of the original help file before  altering 
  369.        this file!
  370.        
  371.        The help windows are also user customizable with any text editor. 
  372.        Caution  must  be  exercised here in that the  windows  follow  a 
  373.        special format. The format is :
  374.        
  375.        <field   >  Must be 8 characters
  376.        
  377.        Text 
  378.        
  379.        <next    >
  380.        
  381.        The last help window should be terminated with an <end>.
  382.        
  383.        Refer  to  the  current help window  file  distributed  with  the 
  384.        system. This file is ASSETS.HLP. 
  385.        
  386.        The  window automatically adjusts itself to the size of the  text 
  387.        created  by the user. This does not mean that the text can be  of 
  388.        any size; any sentences going past the edge of the screen will be 
  389.        truncated.  This will not hurt anything, so if it  happens,  just 
  390.        return and shorten the sentences of the help text.
  391.        
  392.        Customizing  this  file can be helpful when a company  is  making 
  393.        special uses of the fields provided. One example might be if  the 
  394.        user defined field #1 is used for a persons name. The help window 
  395.        might become:
  396.        
  397.        <user-def>
  398.        
  399.         The enter the person's name that is
  400.         responsible for this record.
  401.        
  402.         Be sure to left justify this field and 
  403.         always type with caps on.
  404.        
  405.                                                                  Page 10
  406.        CUSTOM REPORT MENU
  407.        
  408.        Provided  with  the ROKMAR Records Management System  is  a  menu 
  409.        system  to  run  any custom reports without  leaving  the  ASSETS 
  410.        system. This menu system is documented in a separate document: 
  411.        CUSTMENU.DOC.
  412.        
  413.        This  menu  system can be replaced by any other menu  system  the 
  414.        user might feel more comfortable with. When the user selects  the 
  415.        custom  reports  menu from the main ASSETS  pull-down  menu,  the 
  416.        ASSETS  system  simply  executes an  external  DOS  command.  The 
  417.        command that ASSETS performs is "CUSTMENU". Since the menu system 
  418.        supplied  with this system is CUSTMENU.EXE, this program is  run. 
  419.        The command that ASSETS does is equivalent to doing:
  420.        
  421.        C>CUSTMENU
  422.        
  423.        This means that any program or .BAT file called CUSTMENU could be 
  424.        run  instead. To install another menu system, create a .BAT  file 
  425.        called  CUSTMENU.BAT  which runs your favorite menu  program  and 
  426.        remove the CUSTMENU.EXE program from the directory. Then load all 
  427.        your report programs that you have into your menu. Commands  that 
  428.        you might also place here are programs to backup your data, etc.
  429.        
  430.        
  431.        
  432.        
  433.